package com.pig4cloud.pigx.strategy.constant;

/**
 * 策略模块定时任务
 *
 * @since 2022/11/28 15:27
 */
public interface StrategyRedisLockConstant {

    /**
     * 分布式锁前缀
     */
    String LOCK_PREFIX = "lock:";

    /**
     * 任务运行分发器
     */
    String TASK_RUN_DISPATCH = LOCK_PREFIX + "strategy_task_run_dispatch";

    /**
     * 任务运行分发器 过期时间
     */
    long TASK_RUN_DISPATCH_EXPIRE = 10000L;

    /**
     * 任务运行
     * <p>strategy_task_run_switchId
     */
    String TASK_RUN = LOCK_PREFIX + "strategy_task_run_%s";

    /**
     * 一键暂停/恢复/平仓
     * <p>strategy_operation_all_strategyId
     */
    String STRATEGY_OPERATION_ALL = LOCK_PREFIX + "strategy_operation_all_%s";

}
